import { createRouter, createWebHashHistory, RouteLocationNormalized, RouteRecordRaw, RouterOptions } from 'vue-router'
import Login from './views/login.vue'
import sciencechat from './sciencechat/App.vue'

function toID(rote: RouteLocationNormalized): Record<string, any> {
  return {
    ID: Number(rote.params.ID)
  }

}

const routes: RouteRecordRaw[] = [
  {
    path: '/main',
    name: '科学中心',
    component: sciencechat,

  },
  {
    path: '/Login',
    name: '登录',
    component: Login
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,

})

export default router
